﻿<UserControl x:Class="Microsoft.Research.ScientificWorkflow.TridentModelSL.MainWindow"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Name="mainWindow"
    xmlns:vsm="clr-namespace:System.Windows;assembly=System.Windows" 
    xmlns:basics="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls"    
    xmlns:controlToolkit="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Toolkit"
    xmlns:control="clr-namespace:Microsoft.Research.ScientificWorkflow.TridentModelSL.Controls"
    HorizontalAlignment="Stretch" VerticalAlignment="Stretch" MinHeight="400" MinWidth="400">
    <UserControl.Resources>
        <Style x:Key="GridSplitterStyle1" TargetType="basics:GridSplitter">
            <Setter Property="Background" Value="#FFFFFFFF"/>
            <Setter Property="IsTabStop" Value="true"/>
            <Setter Property="PreviewStyle" Value="{StaticResource GridSplitterPreviewStyle}"/>
            <Setter Property="HorizontalAlignment" Value="Right"/>
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="basics:GridSplitter">
                        <Grid x:Name="Root" IsHitTestVisible="{TemplateBinding IsEnabled}">
                            <vsm:VisualStateManager.VisualStateGroups>
                                <vsm:VisualStateGroup x:Name="CommonStates">
                                    <vsm:VisualState x:Name="Normal"/>
                                    <vsm:VisualState x:Name="MouseOver"/>
                                    <vsm:VisualState x:Name="Disabled">
                                        <Storyboard>
                                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="Root" Storyboard.TargetProperty="Opacity">
                                                <SplineDoubleKeyFrame KeyTime="0" Value="0.5"/>
                                            </DoubleAnimationUsingKeyFrames>
                                        </Storyboard>
                                    </vsm:VisualState>
                                </vsm:VisualStateGroup>
                                <vsm:VisualStateGroup x:Name="FocusStates">
                                    <vsm:VisualStateGroup.Transitions>
                                        <vsm:VisualTransition GeneratedDuration="0"/>
                                    </vsm:VisualStateGroup.Transitions>
                                    <vsm:VisualState x:Name="Unfocused"/>
                                    <vsm:VisualState x:Name="Focused">
                                        <Storyboard>
                                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="FocusVisual" Storyboard.TargetProperty="Opacity">
                                                <SplineDoubleKeyFrame KeyTime="0" Value="1"/>
                                            </DoubleAnimationUsingKeyFrames>
                                        </Storyboard>
                                    </vsm:VisualState>
                                </vsm:VisualStateGroup>
                            </vsm:VisualStateManager.VisualStateGroups>
                            <Rectangle Width="6" Fill="{TemplateBinding Background}" StrokeThickness="0"/>
                            <Grid Height="8" x:Name="HorizontalTemplate">
                                <StackPanel Height="6" VerticalAlignment="Center">
                                    <Ellipse Fill="#FFAFAFAF" Stroke="{x:Null}" StrokeThickness="1" Width="2" Height="2"/>
                                    <Ellipse Fill="#FFAFAFAF" Stroke="{x:Null}" StrokeThickness="1" Width="2" Height="2"/>
                                    <Ellipse Fill="#FFAFAFAF" Stroke="{x:Null}" StrokeThickness="1" Width="2" Height="2"/>
                                    <Ellipse Fill="#FFAFAFAF" Stroke="{x:Null}" StrokeThickness="1" Width="2" Height="2"/>
                                </StackPanel>
                            </Grid>
                            <Grid x:Name="VerticalTemplate" Width="8" Visibility="Collapsed">
                                <StackPanel HorizontalAlignment="Center" VerticalAlignment="Center" Width="Auto" Orientation="Vertical">
                                    <Ellipse Fill="#FFAFAFAF" Stroke="{x:Null}" StrokeThickness="1" Width="2" Height="2" Margin="0,0,0,3"/>
                                    <Ellipse Fill="#FFAFAFAF" Stroke="{x:Null}" StrokeThickness="1" Width="2" Height="2" Margin="0,0,0,3"/>
                                    <Ellipse Fill="#FFAFAFAF" Stroke="{x:Null}" StrokeThickness="1" Width="2" Height="2" Margin="0,0,0,3"/>
                                    <Ellipse Fill="#FFAFAFAF" Stroke="{x:Null}" StrokeThickness="1" Width="2" Height="2" Margin="0,0,0,3"/>
                                </StackPanel>
                            </Grid>
                            <Rectangle x:Name="FocusVisual" IsHitTestVisible="false" Opacity="0" Stroke="#FF6DBDD1" StrokeThickness="1"/>
                        </Grid>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
    </UserControl.Resources>
    <Grid x:Name="LayoutRoot" Background="White" ShowGridLines="False" HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
        <controlToolkit:BusyIndicator IsBusy="{Binding Working, ElementName=mainWindow}" Grid.Row="0">
            <!--{Binding RelativeSource={RelativeSource Self}, Path=Working}-->
            <Grid>
                <Grid.RowDefinitions>
                    <RowDefinition Height="70"/>
                    <RowDefinition Height="*"/>
                    <RowDefinition Height="25"/>
                </Grid.RowDefinitions>
                <Grid x:Name="gridToolBarPane" Grid.Row="0"/>
                <Grid Grid.Row="1" ShowGridLines="False">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="0.25*"/>
                        <ColumnDefinition Width="*"/>
                        <ColumnDefinition Width="Auto"/>
                    </Grid.ColumnDefinitions>
                    <Grid x:Name="gridNavigationPane" Grid.Column="0" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"/>
                    <Grid x:Name="gridWorkAreaPane" Grid.Column="1" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"/>
                    <Grid x:Name="gridPropertyPane" Grid.Column="2" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"/>
                    <basics:GridSplitter HorizontalAlignment="Left" VerticalAlignment="Stretch" Width="8" Grid.Column="1" BorderThickness="1,0,1,0" Style="{StaticResource GridSplitterStyle1}">
                        <basics:GridSplitter.BorderBrush>
                            <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                <GradientStop Color="#00FFFFFF"/>
                                <GradientStop Color="#00FFFFFF" Offset="1"/>
                                <GradientStop Color="#FFFFFFFF" Offset="0.5"/>
                            </LinearGradientBrush>
                        </basics:GridSplitter.BorderBrush>
                        <basics:GridSplitter.Background>
                            <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                <GradientStop Color="#00FFFFFF"/>
                                <GradientStop Color="#00FFFFFF" Offset="1"/>
                                <GradientStop Color="#FFE7E7E7" Offset="0.518"/>
                            </LinearGradientBrush>
                        </basics:GridSplitter.Background>
                    </basics:GridSplitter>
                </Grid>
                <control:StatusBar x:Name="statusBar" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Grid.Row="2"/>
            </Grid>
        </controlToolkit:BusyIndicator>
    </Grid>
</UserControl>
